import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/jd",
  },
  //路由的重定向，代表在/路径的时候会重新把路径定义到/jd
  //也可以把要在打开项目时就加载的页面的path直接设置为/
  {
    path: "/jd",
    name: "jd",
    component: () => import("../views/Jd.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
